package com.cy.shiro.service.impl;

import com.cy.shiro.dao.SysUserDao;
import com.cy.shiro.pojo.SysUser;
import com.cy.shiro.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class SysUserServiceImpl implements SysUserService {

    @Autowired
    private SysUserDao sysUserDao;

    @Override
    public SysUser findByUsername(String username) {
        return sysUserDao.findByUsername(username);
    }

    @Override
    public SysUser findById(Integer id) {
        return sysUserDao.findById(id);
    }

    @Override
    public List<SysUser> selectAll(Map<String, String> map) {
        return sysUserDao.selectAll(map);
    }

    @Override
    public Integer addUser(Map<String, String> map) {
        return sysUserDao.addUser(map);
    }

    @Override
    public Integer editUser(SysUser sysUser) {
        return sysUserDao.editUser(sysUser);
    }

    @Override
    public Integer delUser(Integer id) {
        return sysUserDao.delUser(id);
    }

}
